package com.foeye.fastjson;

import java.util.Date;

import com.foeye.test.entity.User;

public class TestFastjson {
	
	
	
	public static void main(String[] args) {
		/*
		 * 序列化
		 */
		User user = newUser();
//		String text = JSON.toJSONString(user);
//		String text = JSON.toJSONString(user, SerializerFeature.WriteDateUseDateFormat);
//		System.out.println(">>>text=" + text);
		
		
	}
	
	private static User newUser() {
		User user  = new User();
		user.setId(1001);
		user.setUsername("张三");
		user.setSex("男");
		user.setBirthday(new Date());
		user.setAddress("山东省青岛市城阳区");
		return user;
	}
	
	
	
	
	
	

}
